from pyecharts.charts import Line
from pyecharts.options import TitleOpts, LegendOpts, ToolboxOpts, VisualMapOpts

line = Line()
line.add_xaxis(["1", "2", "3"])
line.add_yaxis("GDP", [100, 600, 500])
line.add_yaxis("GAL", [200, 50, 800])

line.set_global_opts(
    # 设置标题
    title_opts=TitleOpts(title="gdp和人均收入", pos_left="center", pos_bottom="1%"),
    # 图例
    legend_opts=LegendOpts(is_show=True),
    # 工具箱
    toolbox_opts=ToolboxOpts(is_show=True),
    # 视觉映射
    # visualmap_opts=VisualMapOpts(is_show=True)
)

line.render()
